package com.example.administrator.myapplication;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.denglu);
        findViewById(R.id.but1).setOnClickListener(this);
        findViewById(R.id.zhuce).setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
    switch (v.getId()){
        case R.id.but1:
            Intent intent = new Intent(MainActivity.this,paihang.class);
            startActivity(intent);
            break;
        case R.id.zhuce:
            Intent intent1 = new Intent(MainActivity.this,zhuce.class);
            startActivity(intent1);
            break;
    }
    }
}
